Swap to from js-yaml
to yaml
for Parsing YAML
#1227
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1082 #912 #992 #660 #632 #649
The following are a list of tickets that are potentially fixable with the merger of this change, but logic will need to change in order to properly handle these scenarios:
Relates to #715 #1217 #617
The main reason for making this change is getting closer to having a round trip parser for the Linter to use on the YAML. This change helps with supporting more YAML syntax as well as having a less buggy experience for end users. It should result in fewer instances where things get broken.
This can be better in the long run for users. However it does bring with it some drawbacks that users may not like:
[
in a single line array and have a space added before]
at the end of a single line arrayFFF: -
becomes
FFF: -
This does not seem to change its meaning in Obsidian which should be fine. But the regex will likely no longer find it. So we may need to update that as well to use this before it can be merged.
toString
logic on the parsed values results in different values from what was originally present